﻿#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Data;
#else
using System.Windows.Data;
#endif
using MugenMvvmToolkit.Converters;

namespace MugenMvvmToolkit.Bindings
{
    /// <summary>
    ///     This binding reverses a Boolean value (True == False, False == True).
    /// </summary>
    public sealed class InverseBooleanBinding : Binding
    {
        #region Properties

        /// <summary>
        ///     Gets the default converter for this binding.
        /// </summary>
        public static readonly InverseBooleanConverter BooleanConverter = new InverseBooleanConverter();

        #endregion

        #region Constructors

        /// <summary>
        ///     Initializes a new instance of the <see cref="InverseBooleanBinding" /> class.
        /// </summary>
        public InverseBooleanBinding()
        {
            Converter = BooleanConverter;
        }

#if !NETFX_CORE
        /// <summary>
        ///     Initializes a new instance of the <see cref="InverseBooleanBinding" /> class with an initial path.
        /// </summary>
        /// <param name="path">
        ///     The initial <see cref="P:System.Windows.Data.Binding.Path" /> for the binding.
        /// </param>
        public InverseBooleanBinding(string path)
            : base(path)
        {
            Converter = BooleanConverter;
        }
#endif
        #endregion
    }
}